<?php
// +----------------------------------------------------------------------
// | EtrolPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Author:LJQ <liujiqi@etrol.com> 
// +-----------------------------------------------------------------------

namespace app\common\model;

/**
* 模型基类
*/
class Base extends \think\Model{
	/**
	 * 数据修改
	 * @return [bool] [是否成功]
	 */
	protected $autoWriteTimestamp = true;
	
	public function change($data){
		if (isset($data['id']) && $data['id']) {
			return $this->save($data, array('id'=>$data['id']));
		}else{
			return $this->save($data);
		}
	}
}